
import org.mindrot.jbcrypt.BCrypt;

public class BCryptDemo {

    static String mi;

    public static void main(String[] args) {
        String pass="123";
        String gensalt;
        gensalt=BCrypt.gensalt();
        mi=BCrypt.hashpw(pass,gensalt);
        System.out.println("盐值="+gensalt);
        System.out.println("密文="+mi);

        System.out.println(BCrypt.checkpw("1234",mi));

    }
}
